#



def zichuan(str1):
    l = 0
    max_len = 0
    sw = set()
    for r in range(len(str1)):
        while str1[r] in sw:
            sw.remove(str1[l])
            l+=1
        sw.add(str1[r])
        max_len = max(max_len,r-l+1)
    print(max_len)

zichuan('abcabcdd')